Skip to content

fix(e2): ground relative claim times against in-document session anchors (#158) - #179

Merged
fazpu merged 2 commits into
mainfrom
fix/e2-temporal-anchoring
Jul 29, 2026
Merged

fix(e2): ground relative claim times against in-document session anchors (#158)#179
fazpu merged 2 commits into
mainfrom
fix/e2-temporal-anchoring

Conversation

@fazpu

@fazpu fazpu commented Jul 29, 2026

Copy link
Copy Markdown
Member

Closes #158.

What

WHEN questions failed even with perfect retrieval: a claim like "went to the support group yesterday" stored the relative phrase with no absolute time anywhere (13/168 claims got valid-time on the flash arm; none of the gold ones). Two changes:

  1. Extraction resolves relative time into structured D41 fields. The Claimify prompt now REQUIRES resolving relative temporal expressions ("yesterday", "last Saturday", "last year") against the absolute anchor in the document header, into the existing valid_kind/valid_from_iso/valid_until_iso/valid_precision fields with honest precision — day as equal bounds, year as calendar-range bounds (2022-01-01..2022-12-31). Three worked examples. Claim text keeps the source's relative wording; computed dates never enter claim_text or added_context — which also removes the old prompt's instruction to resolve relative dates via decontextualization, a path the D32 union-grounding gate would reject as non-verbatim. No anchor → fields stay null; never invent. E2_EXTRACTOR_VERSION 07g→07h (re-extraction under D56).

  2. The stamp is visible at answer time. claims_verbatim and relation-evidence hydration now surface nullable claim_valid_from/claim_valid_until on evidence rows via the shared EvidenceResult envelope model (both SQL paths; the benchmark client shares the model, so it flows through with no benchmark change). Precision/kind enums intentionally not surfaced — inferable from the bounds; named as a non-goal in the design doc.

No migrations, no benchmarks/ changes, no protocol-fingerprinted content touched. decisions.md D41 amendment (2026-07-29); website API reference updated.

Acceptance (per #158)

On the smoke corpus after re-extraction under 07h: the two gold WHEN facts (support-group visit → day precision 2023-05-07; sunrise painting → year 2022) must carry grounded claim_valid_from. Verified on the VM store after merge, before the full benchmark.

Reviews

  • Grok-4.5 adversarial review: REQUEST CHANGES → remediated → conditional APPROVE. Verified: date arithmetic in prompt examples (Mon 2023-05-08 → Sat 2023-05-06), grounding-gate isolation from structured fields, both EvidenceResult SQL paths covered (no silent third path), naive-datetime rejection, D56 version-bump semantics, old-envelope compat. Blocking finding (design doc retained pre-Relative temporal expressions are never grounded to the session date — WHEN questions fail even when the event claim is in store #158 anti-pattern worked examples that could re-break the fix) remediated in the amended commit; three minor notes (non-goal naming, website wording, last-Saturday test pin) also applied.

  • Claude (final review): verified prompt/design consistency post-remediation, benchmark envelope compatibility, ran affected suites green.

  • I have read and agree to the RememberStack Contributor License Agreement v1.0.

@fazpu
fazpu enabled auto-merge (squash) July 29, 2026 17:27
@github-actions

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/rememberstack/model
  envelope.py
  src/rememberstack/surfaces
  query_engine.py
  src/rememberstack/workers
  e1.py
  e2.py
Project Total  

This report was generated by python-coverage-comment-action

@fazpu
fazpu merged commit 53e6543 into main Jul 29, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Relative temporal expressions are never grounded to the session date — WHEN questions fail even when the event claim is in store

1 participant